package cn.yj.syslog.service;

import cn.yj.params.check.annotation.Require;
import cn.yj.syslog.entity.PageView;
import cn.yj.syslog.mapper.PageViewMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;


/**
 * <br>
 *
 * @author 永健
 * @since 2020-12-17 18:31
 */
@Service
public class PageViewServiceService extends ServiceImpl<PageViewMapper,PageView> implements IPageViewService {

    @Override
    public long countByDate(@Require Date date) {
        return baseMapper.countVisitByDate(date);
    }

    @Override
    public long countByDateRange(@Require Date startTime,@Require Date endTime) {
        return baseMapper.countVisitByDateRange(startTime,endTime);
    }

    @Override
    public long allCount() {
        return baseMapper.allCount();
    }
}
